
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>商品详细信息显示</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
    <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css" media="screen" />
</head>
<body>
<!-- 顶栏 -->
<div th:replace="seller/topp"></div>
<!-- 中间主体 -->
<div class="container" id="content">
    <div class="row">
        <div th:replace="seller/menu::menu"></div>
        <div class="col-md-10">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <div class="row">
                        <h1 class="col-md-5">商品详细信息管理</h1>
<!--                        <form class="bs-example bs-example-form col-md-5" role="form" style="margin: 20px 0 10px 0;" action="<%=request.getContextPath()%>/admin/selectCourse" id="form1" method="post">-->
<!--                            <div class="input-group">-->
<!--&lt;!&ndash;                                <input type="text" class="form-control" placeholder="请输入名称" name="findByName">&ndash;&gt;-->
<!--&lt;!&ndash;                                <span class="input-group-addon btn" onclick="document.getElementById('form1').submit" id="sub">搜索</span>&ndash;&gt;-->
<!--                                <input type="text" id="keyword" name="keyword" size="14" />-->
<!--                                <input type="submit" name="searchProducts" value="搜索" />-->
<!--                            </div>-->
<!--                        </form>-->
<!--                        <button class="btn btn-default col-md-2" style="margin-top: 20px" onClick="location.href='/seller/itemAdd'">-->
                        <a th:href="@{'itemAdd?productId='+${productId}}">
                        <button class="btn btn-default col-md-2" style="margin-top: 20px" >
                            添加商品
                            <sapn class="glyphicon glyphicon-plus"/>
                        </button>
                        </a>
                    </div>
                </div>
                <h4> return to <a th:href="@{'viewShowProduct?categoryId='+${categoryId}}" th:text="${productId}"> a </a> </h4>
                <table class="table table-bordered">
                    <thead>
                    <tr>
                        <th>itemId</th>
                        <th>productid</th>
                        <th>listprice</th>
                        <th>unitcost</th>
                        <th>supplier</th>
                        <th>status</th>
                        <th>attribute</th>
                        <th>quantity</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="i:${itemList}">
                        <td th:text="${i.itemId}">itemId</td>
                        <td th:text="${productId}">productId</td>
                        <td th:text="${i.listPrice}">listprice</td>
                        <td th:text="${i.unitCost}">unitcost</td>
                        <td th:text="${i.supplierId}">supplier</td>
                        <td th:text="${i.status}">status</td>
                        <td th:text="${i.attribute1}">attribute</td>
                        <td th:text="${i.quantity}">quantity</td>
                        <td>
                            <a th:href="@{'viewItemEdit?itemId='+${i.itemId}}">
                                <button class="btn btn-default btn-xs btn-info" >修改</button></a>

                            <a th:href="@{'deleteItem?itemId='+${i.itemId}+'&productId='+${productId}}">
                            <button class="btn btn-default btn-xs btn-danger btn-primary">删除</button></a>
                            <!--弹出框-->
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
</body>
</html>